<template>
  <div class="box">
    <a v-for="name in list"   :href="name.url+'&rootMobile='+rootMobile+'&accessToken='+accessToken+'&rootAppId='+rootAppId">
      <img :src="name.mainPhoto.smallPicUrl" alt="">
      <span class="name">{{name.shareTitle}}</span><br>
      <span class="price">￥{{name.price}}</span>
    </a>
  </div>
</template>
<script>
  import axios from 'axios';
  import $ from 'jquery'
  export default {
    name:'all',
    data () {
      return {
        list: [],
        rootMobile:"13167676767",
        accessToken:"067a37aed0224984acc0bef247c12245_440100000002743",
        rootAppId:"440100000002743"
      }
    },
    mounted(){
      $("img").css("width","100%");
      const _this=this;
      axios.get("http://123.127.41.166:8180/mall/app/category/goods/jdlist.json?orgFlag=0&pageNo=1&homeClassId=70540&classId=72574").then(function(res) {
        console.log(res);
        _this.list=res.data.data.list;
      },function(error) {
        alert(error);
      })
    }
  }
</script>

